<?php
include_once './config.php';
$str=include_once './user.php';

//var_dump($str);
$res=$_POST;
//var_dump($res);exit();
foreach($str as $v){
    if($v['usename']==$res['usename'] && $v['password']==$res['password']){
       session_start();
       $_SESSION['usename']=$res['usename'];
        succer("登录成功","index.php",3,"首页");

    }
}

fed("登录失败","index.php",3,"首页");